package io;

import java.io.File;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: hp
 * Date: 2024-08-15
 * Time: 16:38
 */
public class Demo3 {
    public static void main(String[] args) {
        File file = new File("./text.txt");
        file.deleteOnExit();
        System.out.println("删除完毕");
//根据File对象，标注文件将被删除，删除动作会到JVM运行结束时才会进行。
        Scanner scanner = new Scanner(System.in);
        scanner.next();
    }
}
